<#assign  FCK =JspTaglibs["http://fckeditor.net/tags-fckeditor"]/>
<#import "../../controls/control.ftl" as c>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<link href="../styles/dntmanager.css" type="text/css" rel="stylesheet" />
<link href="../styles/modelpopup.css" type="text/css" rel="stylesheet" />

<script type="text/javascript" src="../js/divcover.js"></script>
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="../js/modalpopup.js"></script>
<script type="text/javascript" src="../../javascript/ajax.js"></script>
<script type="text/javascript" src="../../javascript/prototype1.5.1.js"></script>

<html>
<head>
    <title>类别列表</title>
    
    <link href="../styles/datagrid.css" type="text/css" rel="stylesheet" />
    <link href="../styles/dntmanager.css" type="text/css" rel="stylesheet" />
    <link href="../styles/calendar.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="../js/common.js"></script>
    <script type="text/javascript">
        function Check(form)
        {
            CheckAll(form);
            checkedEnabledButton(form,'id','DelRec');
        }
    </script>
    <@c.validator "Form1" />
</head>
<body>
<@s.form name="Form1" theme="simple" method="post"> ${htmlBuilder}
        <table class="ntcplist" >

<tr>

<td>

<table class="datalist" cellspacing="0" rules="all" border="1" id="DataGrid1" style="border-collapse:collapse;">
	<tr class="category">
		<td nowrap="nowrap" style="border-color:#EAE9E1;border-width:1px;border-style:solid;">文章管理</td>
	</tr>
	<td nowrap="nowrap" style="text-align:left;border-color:#EAE9E1;border-width:1px;border-style:solid;">
	文章标题:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<@c.textBox id="article.title" width="200px" hintTitle="提示" 
						    hintInfo="文章标题" required="true" min="1" max="24" size="10" maxlength="10" value=""/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	</td>
	<tr>
		<td nowrap="nowrap" style="text-align:left;border-color:#EAE9E1;border-width:1px;border-style:solid;">
		文章类别:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<@s.select name="fid" id="form1_ecinfo_cityCode" onchange="typeChange(this)" size="1" list="fartherTypeList" listKey="id" listValue="name"/> <@s.select required="true" id="article.parentType.id" name="article.parentType.id" size="1" list="请选择" /> 
		</td> 
	</tr>
	<tr>
		
		<td nowrap="nowrap" style="text-align:left;border-color:#EAE9E1;border-width:1px;border-style:solid;">
		文章内容:
		${edit}
		</td>
	</tr>
	
	

</table></td></tr></TABLE>
<br/>
<br/>
<button type="submit"  class="ManagerButton" id="SubmitAdd" name="SubmitAdd" value="SubmitAdd"
	onclick="submit()"><img
	src="../images/submit.gif" /> 保 存 </button>
	<input type="hidden" name="article.user.id" value="${userid}"/>
<@c.hint hintImageUrl="../images" />
</@s.form>

<script type="text/javascript">
function typeChange(obj)
   {
     var url='/LForum/admin/web/article.action?ajax=true&fid' + obj.options[obj.selectedIndex].value;
     var params = Form.serialize('Form1');
     var myajax = new Ajax.Request(url,
            {
        method:'post',
        parameters:params,
        onComplete:function(response)
        {
          var select =document.getElementById("article.parentType.id");
          select.innerHTML = "";
          var dicter = eval(response.responseText);
          for(var i=0;i<dicter.length;i++)
          {
           var _o = new Option();
           _o.text = dicter[i].name;
           _o.value = dicter[i].code;
           select.options.add(_o);
          }
        },
        asynchronous:true
        }
    );
   }


</script>
</body>
</html>
